using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data;
namespace CrmDocman.DataCore {
    public class DataBridge : DataBridgeAbs {
        public static DataBridge GetInstance() {
            DataBridge bridge = new DataBridge();
            string connectionString = ConfigurationSettings.AppSettings["ITDB"];
            ConnectionWrapper connection = new ConnectionWrapper(connectionString);

            connection.OpenConnection();
            bridge.Connection = connection;
            return bridge;


        }
        public static DataBridge GetInstance(bool autoHandleTransaction) {
            DataBridge bridge = new DataBridge();
            string connectionString = ConfigurationSettings.AppSettings["ITDB"];
            ConnectionWrapper connection = new ConnectionWrapper(connectionString);

            connection.OpenConnection(autoHandleTransaction);
            bridge.Connection = connection;
            return bridge;
            //StackTrace st = new StackTrace(0, true);
            //StackFrame frame = st.GetFrame(0);

        }

    }
}
